#include<iostream>

using namespace std;


void Test01(){
    unsigned short x, y;
    cin >> x >> y;
    x = (x | x << 2) & 0x33;
    x = (x | x << 1) & 0x55;
    y = (y | y << 2) & 0x33;
    y = (y | y << 1) & 0x55;
    unsigned short z = x | y << 1;
    cout << z << endl;
}


void Test02(){
    char x, y;
    cin >> x >> y;
    x = (x | x << 2) & 0x33;
    x = (x | x << 1) & 0x55;
    y = (y | y << 2) & 0x33;
    y = (y | y << 1) & 0x55;
    char z = x | y << 1;
    cout << z << endl;
}


/**
 * unsigned short输出的是数字，char输出的是字符
 */
int main ()
{

    Test02();
    return 0;
}
